/**
 * eCommerce Application Sample for J2EE Training
 * Remote interface for the EcomAdmin bean
 * EJB3.0
 * @author Fabienne Boyer - Didier Donsez - may 2006
 */
package ecom.session;

import ecom.exception.EcomException;
import ecom.entity.Account;
import ecom.entity.Category;
import ecom.entity.Country;
import ecom.entity.Customer;
import ecom.entity.Product;
import ecom.entity.ProductStore;
import ecom.entity.Store;
import java.util.List;

public interface EcomAdminRemote {

    void createAccount(String iban, String accountOwner, double balance) throws EcomException;
    
    List<Account> listAccount();
    Account getAccountByIban(String iban);
    Account getAccountById(int id);
    void modifyAccount(int id,String iban, double balance);
    void deleteAccount(int id);

    void createStore(String name);
    List<Store> listStore();
    void modifyStore(Integer storeId, String newNameStore);
    void associateAccountToStore(Integer storeId, Integer accountID);
    void associateProductToStore(int productId, int storeId, int stock, Double price) throws EcomException;
    void deleteStore(Integer storeId);

    void createProduct(String productName, String description , int categoryId) throws EcomException;
    List<Product> listProducts();
    void deleteProduct(int idProduct);
    Product findProductById(int id);
    Product findProductByName(String name);
    
    List<Product> findProductsByInName(String inName);
    
    List<Product> findProductsByMaxPrice(Double maxPrice);

    List<ProductStore> listProductsStore(int idStore);

    List<Product> listProductsByCategory(int idCategory);
    
    List<Category> listCategory();
    Category findCategory(int idCategory);
    public void createCategory(String label, String description) throws EcomException;
    public void deleteCategory(int id);
     
    List<Customer> listCustomer();
    void createCustomer(String lastName, String firstName, String email, String password, String street, String zipCode, String city, int countryId, int idAccount) throws EcomException;
    void createCustomer(String lastName, String firstName, String email, String password, String street, String zipCode, String city, int countryId, String iban, double balance);
    void modifyCustomer(String lastName, String firtName, String email);
    void deleteCustomer(int idCustomer);
    void addAdressToCustomer(Customer c);

    List<Country> listCountry();
}
